﻿@{
    ViewBag.Title = "Test";
    var F = Html.F();
}

@section body {
    @(F.TextArea()
                                .ID("FloatCustomerService")
                                .Label("浮动客服")
                                .Height(80)
                                .MaxLength(1000)
                                .Text(ViewBag.text)
    )

    <div id="exmple1">
        <div id="exmple2"></div>
        <div id="exmple3"></div>
    </div>


}


@section script {

    <script>
        // 页面控件初始化完毕后，会调用用户自定义的onReady函数
        F.ready(function () {
            //setInterval("F.ui.grid1.loadDataUrl(\"/Home/GetData\")", 2000);
            //setInterval("F.ui.grid2.loadDataUrl(\"/Home/GetData\")", 1000);
            //setInterval("F.ui.grid3.loadDataUrl(\"/Home/GetData\")", 3000);


            F.create(
                {
                    type: 'tabstrip', isFluid: true, cls: 'blockpanel', id: 'tabstrip1', renderTo: '#exmple2', tabPosition: 'top', activeTabIndex: 0, isViewPort:true,
                    items: [{
                        type: 'tab', layout: 'fit', bodyPadding: 10, title: 'Maintenance_DeviceMaintenance',
                        items: [
                            {
                    type: 'panel', renderTo: '#exmple2', border: false, isFluid: true, header: false, autoScroll: true,
                    items: [{
                        type: 'grid', isFluid: true, cls: 'blockpanel', id: 'grid1', renderTo: '#exmple2', title: '表格',
                        columns: [{
                            columnType: 'rownumberfield'
                        }, {
                            text: '姓名', field: 'name', width: 100
                        }, {
                            text: '性别', field: 'gender', width: 80
                        }, {
                            text: '入学年份', field: 'entranceYear', width: 80
                        }, {
                            text: '是否在校', field: 'atSchool', width: 80, columnType: 'checkboxfield'
                        }, {
                            text: '所学专业', field: 'major', flex: 1,
                            renderer: function (value, params) {
                                return '<a href="http://gsa.ustc.edu.cn/search?q=' + encodeURIComponent(value) + '" target="_blank">' + value + '</a>';
                            }
                        }, {
                            text: '注册日期', field: 'logTime', width: 100
                        }],
                        idField: 'id', textField: 'name',
                        dataUrl: '/Home/GetData'
                    }, {
                        type: 'grid', isFluid: true, cls: 'blockpanel', id: 'grid2', renderTo: '#exmple2', title: '表格',
                        columns: [{
                            columnType: 'rownumberfield'
                        }, {
                            text: '姓名', field: 'name', width: 100
                        }, {
                            text: '性别', field: 'gender', width: 80
                        }, {
                            text: '入学年份', field: 'entranceYear', width: 80
                        }, {
                            text: '是否在校', field: 'atSchool', width: 80, columnType: 'checkboxfield'
                        }, {
                            text: '所学专业', field: 'major', flex: 1,
                            renderer: function (value, params) {
                                return '<a href="http://gsa.ustc.edu.cn/search?q=' + encodeURIComponent(value) + '" target="_blank">' + value + '</a>';
                            }
                        }, {
                            text: '注册日期', field: 'logTime', width: 100
                        }],
                        idField: 'id', textField: 'name',
                        dataUrl: '/Home/GetData'
                    }, {
                        type: 'grid', isFluid: true, cls: 'blockpanel', id: 'grid3', renderTo: '#exmple2', title: '表格',
                        columns: [{
                            columnType: 'rownumberfield'
                        }, {
                            text: '姓名', field: 'name', width: 100
                        }, {
                            text: '性别', field: 'gender', width: 80
                        }, {
                            text: '入学年份', field: 'entranceYear', width: 80
                        }, {
                            text: '是否在校', field: 'atSchool', width: 80, columnType: 'checkboxfield'
                        }, {
                            text: '所学专业', field: 'major', flex: 1,
                            renderer: function (value, params) {
                                return '<a href="http://gsa.ustc.edu.cn/search?q=' + encodeURIComponent(value) + '" target="_blank">' + value + '</a>';
                            }
                        }, {
                            text: '注册日期', field: 'logTime', width: 100
                        }],
                        idField: 'id', textField: 'name',
                        dataUrl: '/Home/GetData'
                    }],
                    idField: 'Id',
                    textField: 'DeviceNumber',
                    parentIdField: 'ParentId',
                    tree: {
                        columnId: 'DeviceNumber',
                        icons: false
                    },
                    dataUrl: './Maintenance/ComponentInformation',
                }]
                    }]
                });

        });

    </script>

}